package chapter_9;

public class MyThread2 implements Runnable{
    @Override
    public void run() {
        try {
            Thread.sleep(1500);
        } catch (InterruptedException e) {
            throw new RuntimeException(e);
        }
        System.out.println( Thread.currentThread().getName());
    }

    public static void main(String[] args) throws InterruptedException {
        MyThread2  myRuable = new MyThread2();
        Thread t1 = new Thread(myRuable);
        t1.start();
        for (int i = 0; i < 10; i++) {
            Thread.sleep(500);
            System.out.println( Thread.currentThread().getName() +" "+ (i+1));
        }

    }
}
